Skip to content

Fix ID lookup to handle cases where 'id' is not the primary key of the Django model #20

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 15, 2016

Conversation

morgante
Copy link
Contributor

Currently, the Relay Node Interface will silently and surprisingly fail if the primary key of your Django model is not called id.

This addresses that by exposing the primary key (whatever it is) as the id and querying appropriately for lookups, making it easier to expose existing Django models using Graphene.

@syrusakbary syrusakbary merged commit 1bf5d60 into graphql-python:master Oct 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants